﻿@model List<WebUI.Models.QizSessionReminding>
@using (Ajax.BeginForm(new AjaxOptions()
{
    LoadingElementId = "OnLoadingSpan",
    UpdateTargetId = Request["_utid"],
    InsertionMode = InsertionMode.Replace,
    HttpMethod = "Post",
    OnSuccess = "$('#dialogbox').dialog('close');",
    OnFailure = "OnSiteError"
}))
{
    <div class="tiny-input">
    <fieldset>   
        <legend>基本信息</legend>        
        @Html.Hidden("indexId", Model[0].QizSmsMonthIdxID)
        <div>
            本阶段截至到第 @ViewBag.MonthIndex 个月
            <i>，系统会自动连接到上一个阶段的截至月或出院日期。</i><br />
            <br />
            短信在出院后第
            @ViewBag.SmsSendingMonthIdx
            个月 第 @ViewBag.SmsSendingDayIdx 天发送。 <i>是相对出院开始的月数。</i>
        </div>        
    </fieldset>
    <fieldset>   
        <legend>催报设置：</legend>   
        <div id="smsTemplate"></div> 
        @for(int i=0; i< Model.Count;i++)
        {   
            <div class="editor-label">
                <span style=" font-size:medium; font-weight:bold">第 @(i+1) 次催报:&nbsp;&nbsp;</span>
                @if (Model[i].TaskEnabled == "启用")
                {
                    <input type="checkbox" value= "@i" name="isChecked" checked="checked" />
                }
                else
                {
                    <input type="checkbox" value= "@i" name="isChecked" />
                }
                    @Html.Hidden("RemindingID", Model[i].ID)启用，
                第 @Html.TextBox("monthOffset", Model[i].MonthOffset == 0 ? string.Empty : Model[i].MonthOffset.ToString())个月，
                第 @Html.TextBox("dayOffset", Model[i].DayOffset == 0 ? string.Empty : Model[i].DayOffset.ToString())天
                
            </div>
            <div class="editor-label">
                短信内容:
                @Ajax.ActionLink("[模板]", "ImportSmsTemplate", new { type = "短信催报", insertId=i }, new AjaxOptions() { UpdateTargetId = "smsTemplate", HttpMethod = "Get", Confirm = "" })                
                </div>
                <div class="editor-label">
                @Html.TextArea("textContent", Model[i].TextContent, new { id = i, style = "width:90%" })
            </div>
        }    
        <p>
            <input type="submit" value="确定"/>
        </p>  
    </fieldset>
    
    </div>
}



